 <ul id="myTab" class="nav nav-tabs">
            <li class=""><a href="<?php echo site_url('user/tasks/projects_details')?>">On Going Project</a></li>
			<li class="active"><a href="<?php echo site_url('user/tasks/completed_projects')?>" >Completed Projects</a></li>              
            </ul>
<h3>Completed Projects</h3>
<?php if(count($completed_projects)) { ?>
<div class="muted" >
<ul type="none" >
<?php foreach($completed_projects as $cp) {?>
<li>
<div class="row-fluid">
<div class="span5"><a class="tooltips" title="<?php echo $cp->desc?>" href="<?= site_url('user/tasks/milestones_details').'/'.$cp->id?>"><?= $cp->name?></a></div>
<div class="span2"><?= $this->common_model->get_username_id($cp->assigned_to)?></div>
<div class="span1">100 %</div>
<div class="span2"></div>
<div class="span2">
<a class="tooltips" onclick="incompleted(<?php echo $cp->id?>)" style="cursor:pointer"><i class="icon-ok-sign"></i> Reopen Project</a>
</div>
</div>
</li>
<?php }?>
</ul>
</div>
<?php } else { echo 'No Projects Completed Yet';}?>


<script type="text/javascript">
function completed(project_id)
{
//alert('asd');
//alert(project_id)
$.post('<?= site_url('user/tasks/project_completed');?>',{project_id : project_id }, function(data) {		
				alert('Project Completed Successfully');
				location.reload();
});	
}
	
function incompleted(project_id)
{
//alert('asd');
//alert(project_id)
$.post('<?= site_url('user/tasks/project_incompleted');?>',{project_id : project_id }, function(data) {		
				alert('Project Opened');
				location.reload();
});	
}	
</script>